package com.zsrt.java.day20161229.wrl.demo06.user.service;

import com.zsrt.java.day20161229.wrl.demo06.user.entity.UserEntity;

public class UserEntityService {
	
	/**
	 * 验证登录：优化
	 * @param user	模型层
	 * @return	boolean
	 */
	public boolean login02(UserEntity user){
		String username = user.getUsername();
		String password = user.getPassword();
		
		//标准	zsrt  qq123
		if("zsrt".equals(username)&&"qq123".equals(password)){
			System.out.println("登录成功...");
			return true;
		}
		System.out.println("登录失败...");
		return false;
	}
	
	/**
	 * 验证登录
	 * @param username	用户名
	 * @param password	密码
	 * @return	boolean
	 */
	public boolean login01(String username,String password){
		//标准	zsrt  qq123
		if("zsrt".equals(username)&&"qq123".equals(password)){
			System.out.println("登录成功...");
			return true;
		}
		System.out.println("登录失败...");
		return false;
	}

}
